package com.sinochem.yunlian.ship.base.biz;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sinochem.yunlian.ship.api.vo.bs.BsMessageSysVO;
import com.sinochem.yunlian.ship.base.entity.BsMessageSms;
import com.sinochem.yunlian.ship.base.entity.BsMessageSys;
import com.sinochem.yunlian.ship.base.mapper.BsMessageSysMapper;
import com.sinochem.yunlian.ship.base.vo.request.SmsFindVo;
import com.sinochem.yunlian.ship.base.vo.request.SysMsgFindVo;
import com.sinochem.yunlian.ship.common.biz.BaseBiz;
import com.sinochem.yunlian.ship.common.util.MapUtil;
import org.springframework.stereotype.Service;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;


/**
 * 
 *
 * @author wh
 * @email ${email}ß
 * @date 2017-11-23 16:09:21
 */
@Service
public class BsMessageSysBiz extends BaseBiz<BsMessageSysMapper,BsMessageSys> {
    public List<BsMessageSysVO> getSysMsg(Long userId){
        return mapper.getSysMsg(userId);
    };


    public Page<BsMessageSys> findSysList(SysMsgFindVo findVo) throws IllegalAccessException, IntrospectionException, InvocationTargetException {
        Page<BsMessageSys> result= PageHelper.startPage(findVo.getPageNum(),findVo.getPageSize());
        mapper.findSysList(MapUtil.convertBean(findVo));
        return result;
    }
}